<template>
  <section class="base-info">
    <section class="close" @click="close">
      <img style="width: 100%;height: 100%;" src="../../../assets/image/base/close.png">
    </section>

    <section class="title">
      基础信息
    </section>
    <section style="height: .7rem;overflow: overlay">
      <section class="row">
        <section class="label">编号</section>
        <section class="mh">：</section>
        <section class="value">{{data.number}}</section>
      </section>
      <section class="row">
        <section class="label">位置</section>
        <section class="mh">：</section>
        <section class="value">
          {{data.addr}}
        </section>
      </section>
    </section>

    <section class="title" style="padding-top: .05rem;">
      业务信息
    </section>

    <section style="width: 86%;margin: 0 auto;display: flex">
      <section style="width: 33%;">
        <section class="yw-value" style="font-weight:400;color:rgba(0,255,150,1);">{{data.status}}</section>
        <section class="yw-label">设备状态</section>
      </section>
      <section style="width: 33%;">
        <section class="yw-value">{{data.deep || ''}}</section>
        <section class="yw-label">当前水深</section>
      </section>
      <section style="width: 33%;">
        <section class="yw-value">{{data.warn}}</section>
        <section class="yw-label">警戒值</section>
      </section>
    </section>
  </section>
</template>

<script>
  export default {
    name: 'BaseInfo',
    props: {
      data: {
        type: Object,
        default: () => {
          return {}
        }
      }
    },
    data() {
      return {

      }
    },
    methods: {
      close() {
        this.$emit('close')
      }
    }
  }
</script>

<style scoped>
  .base-info {
    width: 100%;
    height: 100%;
    position: relative;
  }
  .title {
    height: .3rem;
    width: 86%;
    margin: 0 auto;
    text-align: left;
    padding-top: .18rem;
    font-size:16px;
    font-family:Microsoft YaHei;
    font-weight:400;
    color:rgba(255,255,255,1);
    border-bottom: .01rem solid #00FFFFBB;
  }
  .row {
    display: flex;
    text-align: left;
    width: 86%;
    margin: 0 auto;
    padding: .05rem 0 0 0;
    line-height: .2rem;font-size: .12rem;
  }
  .label {
    width: 25%;
    /*height: .2rem;*/
    color:#A4A4A4;text-align:justify; text-align-last: justify;
  }
  .mh {
    width: 5%;
    /*height: .2rem;*/
    color:#A4A4A4;
  }
  .value {
    width: 70%;
    /*height: .2rem;*/
  }
  .yw-label {
    font-size: .12rem;
    font-family:Microsoft YaHei;
    font-weight:400;
    color:rgba(254,254,254,0.4);
    padding-top: .1rem;
  }
  .yw-value {
    font-size:16px;
    font-family:Microsoft YaHei;
    font-weight:bold;
    color:rgba(255,255,255,1);
    padding-top: .1rem;
  }
  .close {
    width: .17rem;
    height: .17rem;
    cursor: pointer;
    position: absolute;
    top: .22rem;
    right: .22rem;
  }
</style>
